package com.taiyuan.zfmvp.controller.testInterupt;

/**
 * @param
 * @Author: zhoufang@si-tech.com.cn
 * @Descriiption:
 * @Date 2020/7/1
 * @return
 */
public class InterruptThread implements Runnable {
    @Override
    public void run() {
        for (int i = 0;i<5000;i++){
            if(Thread.interrupted()){
                System.out.println("线程处于停止状态，退出");
                break;
            }else{
                System.out.println("i="+i);
            }
        }
    }
}
